<template>
  <div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="createTime" label="创建时间" align="center">
      </el-table-column>
      <el-table-column prop="dkmc" label="地块" align="center">
      </el-table-column>
      <el-table-column prop="ygrq" label="用工日期" align="center">
      </el-table-column>
      <el-table-column prop="ygrs" label="用工人数" align="center">
      </el-table-column>
      <el-table-column prop="rwwcsj" label="操作" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="mini" @click="openView(scope.row)"
            >查看人工核算详情</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <el-pagination
      style="text-align: center; margin-top: 10px"
      layout="total,prev,pager,next,sizes,jumper"
      :page-size="pager.limit"
      :current-page="pager.page"
      :total="pager.totalCount"
      @current-change="handleCurrentChange"
      @size-change="handleSizeChange"
    />
    <el-dialog
      title="人工核算详情"
      :visible.sync="dialogFormVisible"
      width="600px"
      :key="'myDialog' + dialogIndex"
    >
      <el-descriptions :column="1">
        <el-descriptions-item label="农户姓名">{{
          temp.nhxm
        }}</el-descriptions-item>
        <el-descriptions-item label="所属地块">{{
          temp.dkmc
        }}</el-descriptions-item>
        <el-descriptions-item label="用工日期">{{
          temp.ygrq
        }}</el-descriptions-item>
        <el-descriptions-item label="用工人数">{{
          temp.ygrs
        }}</el-descriptions-item>
        <el-descriptions-item label="用工时长">{{
          temp.ygsc
        }}</el-descriptions-item>
        <el-descriptions-item label="用工费用">{{
          temp.ygfy
        }}</el-descriptions-item>
        <el-descriptions-item label="用工内容">{{
          temp.ygnr
        }}</el-descriptions-item>
      </el-descriptions>
    </el-dialog>
  </div>
</template>

<script>
import crudMixin from "@/mixin/crudMixin";
export default {
  mixins: [crudMixin],
  data() {
    return {
      url: {
        list: "/jtnc/jsydagl/krJsydagl/listRghs",
        info: "/jtnc/jsydagl/krJsydagl/getRghsById",
      },
      idName: "rghsId",
    };
  },
  created() {
    this.loadTableList();
    this.resetTemp();
  },
  methods: {
    getRghs(param) {
      this.searchData.jsyId = param.jsyId;
      this.searchData.year = param.year;
      this.searchBtnHandle();
    },
  },
};
</script>

<style lang="scss" scoped>
.rw-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #303133;
}
.rw-con {
  font-size: 14px;
  line-height: 1.5;
  color: #606266;
  margin-bottom: 20px;
  padding-left: 2em;
}
</style>
